package cn.wangzg.course1201;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    private void goActivity(Activity activity) {
        Intent intent = new Intent(this, activity.getClass());
        startActivity(intent);
    }

    public void btnBitmap(View view) {
        goActivity(new BitmapActivity());
    }

    public void btnDraw(View view) {
        goActivity(new DrawActivity());
    }

    public void btnMatrix(View view) {
        goActivity(new MatrixActivity());
    }
}
